
`MASTER FILE. SOLVES AND SIMULATES THE MODEL.
User only needs to define the local path of this folder`

#Set Options
#-------------------------------------------------------------------------------
 addprocs(7)              # Number of threads [≥1]
 @everywhere Local_path   = "/Users/matiasmoretti/Dropbox/Partial_Default/Replication_Package/Quantitative/"
 #@everywhere Local_path   = "F:/Dropbox/Partial_Default/Replication_Package/Quantitative/"
 #@everywhere Local_path  = "/Users/jmorelli/Dropbox/Research/Work_in_progress/Partial_Default/Replication_Package/Quantitative/"

#Solve the baseline model & simulate
#-------------------------------------------------------------------------------
 @everywhere cd(string(Local_path,"01_Baseline_Model/"))
 @everywhere Baseline_α          = true
 include(string(pwd(),"/20_Run_Main.jl"));                               #Solve main model
 include(string(pwd(),"/21_Policies_Plots.jl"))                          #Plots: Policies and bond prices
 include(string(pwd(),"/30_Run_Simulations.jl"))                         #Simulations and Argentine episode


#Solve the perfect-information case & simulate
#-------------------------------------------------------------------------------
 @everywhere cd(string(Local_path,"02_Perfect_Information/"))
 include(string(pwd(),"/20_Run_Main.jl"))                                #Solve model with perfect information
 include(string(pwd(),"/30_Run_Simulations.jl"))                         #Main Simulations


#Create additional tables & figures
#-------------------------------------------------------------------------------
 @everywhere cd(string(Local_path,"03_Appendix/"))
 include(string(pwd(),"/10_Spreads_Ratio.jl"))                           #Compare spreads
 include(string(pwd(),"/20_Derivative_Posterior.jl"))                    #Derivative of expected posterior
 include(string(pwd(),"/40_CEC_plots.jl"))                               #CEC plots [requires Pyplot pkg]


#Solve for different persistence parameters & simulate
#-------------------------------------------------------------------------------
 @everywhere cd(string(Local_path,"03_Appendix/50_Alternative_Persistence"))
 include(string(pwd(),"/51_Run_Alt_Persistence.jl"))                     #Solve model for different persistence values
 include(string(pwd(),"/52_Run_Simulations_Alt_Persistence.jl"))         #Simulate and create tables

#Solve for different values of α and simulate
#-------------------------------------------------------------------------------
@everywhere Baseline_α          = false
@everywhere cd(string(Local_path,"01_Baseline_Model/"))
include(string(pwd(),"/20_Run_Main.jl"));                               #Solve model for different values of α
@everywhere cd(string(Local_path,"03_Appendix/"))
include(string(pwd(),"/30_Elasticity_Alpha.jl"))                        #Simulate and compute elasticity for different values of α
